#include <iostream>
using namespace std;

// 基类：Animal
class Animal {
public:
    virtual void makeSound() const {}
};

// 派生类：Dog
class Dog : public Animal {
public:
    void makeSound() const override {
        cout << "汪汪" << endl;
    }
};

// 派生类：Cat
class Cat : public Animal {
public:
    void makeSound() const override {
        cout << "喵喵" << endl;
    }
};

// 派生类：Bird
class Bird : public Animal {
public:
    void makeSound() const override {
        cout << "叽叽喳喳" << endl;
    }
};

// 函数：让动物发声
void letAnimalMakeSound(const Animal& animal) {
    animal.makeSound();
}

int main() {
    Dog dog;
    Cat cat;
    Bird bird;
    cout << "Dog says: ";
    letAnimalMakeSound(dog);
    cout << "Cat says: ";
    letAnimalMakeSound(cat);
    cout << "Bird says: ";
    letAnimalMakeSound(bird);
    return 0;
}